import unittest

from quote.base.usebrowser import UseBrowser
from quote.web_page.usermanager.login_page import LoginPage


class LoginFailCase(unittest.TestCase):

    def setUp(self):
        self.login_page=LoginPage()

    def test_1_username_pwd_error(self):
        self.login_page.login('','')
        self.assertEqual(self.login_page.get_fail_info(),'请勿非法登录！')

    def test_2_username_null(self):
        self.login_page.login('','8888')
        self.assertEqual(self.login_page.get_fail_info(),'请勿非法登录！')

    def test_3_pwd_null(self):
        self.login_page.login('admin','')
        self.assertEqual(self.login_page.get_fail_info(),'请勿非法登录！')

    def tearDown(self):
        UseBrowser.quit()


if __name__ == '__main__':
    unittest.main()
